home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / DocumentListener.java < prev    next >
Text File  |  1998-06-30  |  2KB  |  57 lines

  1. /*
  2.  * @(#)DocumentListener.java    1.5 97/09/19
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20. package com.sun.java.swing.event;
  21.  
  22. import java.util.EventListener;
  23.  
  24. /**
  25.  * Interface for an observer to register to receive notifications 
  26.  * of changes to a text document.
  27.  *
  28.  * @author  Timothy Prinzing
  29.  * @version 1.5 09/19/97
  30.  */
  31. public interface DocumentListener extends EventListener {
  32.  
  33.     /**
  34.      * Gives notification that there was an insert into the document.  The 
  35.      * given range bounds the freshly inserted region.
  36.      *
  37.      * @param e the document event
  38.      */
  39.     public void insertUpdate(DocumentEvent e);
  40.  
  41.     /**
  42.      * Gives notification that a portion of the document has been 
  43.      * removed.  The range is given in terms of what the view last
  44.      * saw (that is, before updating sticky positions).
  45.      *
  46.      * @param e the document event
  47.      */
  48.     public void removeUpdate(DocumentEvent e);
  49.  
  50.     /**
  51.      * Gives notification that an attribute or set of attributes changed.
  52.      *
  53.      * @param e the document event
  54.      */
  55.     public void changedUpdate(DocumentEvent e);
  56. }
  57.